package com.aspose.cells;

class zayv extends zbz {
   public zayv() {
      this.c(2152);
   }

   void a(ProtectedRange var1) throws Exception {
      this.a((short)(27 + var1.a().size() * 8 + 8 + 3 + var1.getName().length() * 2));
      if (var1.a != null) {
         this.b(this.d() + (short)var1.a.length);
      }

      this.c = new byte[this.d()];
      this.c[0] = 104;
      this.c[1] = 8;
      this.c[12] = 2;
      byte var2 = 19;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.a().size()), 0, this.c, var2, 2);
      int var5 = var2 + 8;

      for(int var3 = 0; var3 < var1.a().size(); ++var3) {
         CellArea var4 = (CellArea)var1.a().get(var3);
         System.arraycopy(com.aspose.cells.b.a.zc.a(var4.StartRow), 0, this.c, var5, 2);
         System.arraycopy(com.aspose.cells.b.a.zc.a(var4.EndRow), 0, this.c, var5 + 2, 2);
         System.arraycopy(com.aspose.cells.b.a.zc.a(var4.StartColumn), 0, this.c, var5 + 4, 2);
         System.arraycopy(com.aspose.cells.b.a.zc.a(var4.EndColumn), 0, this.c, var5 + 6, 2);
         var5 += 8;
      }

      if (var1.a != null) {
         this.c[var5] = 1;
      }

      var5 += 4;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.b()), 0, this.c, var5, 2);
      var5 += 4;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var1.getName().length()), 0, this.c, var5, 2);
      this.c[var5 + 2] = 1;
      var5 += 3;
      System.arraycopy(Encoding.getUnicode().a(var1.getName()), 0, this.c, var5, var1.getName().length() * 2);
      var5 += var1.getName().length() * 2;
      if (var1.a != null) {
         System.arraycopy(var1.a, 0, this.c, var5, var1.a.length);
      }

   }
}
